<%@ page import="cn.com.controler.User.UserDAO" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.com.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/9/26
  Time: 22:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人信息查询</title>
    <style type="text/css" rel="stylesheet">
        body{
            width: 1010px;
        }
        .content{
            width: 800px;
            margin: 0 auto;
            margin-top: 50px;
            border: 2px solid #0192e8;
            text-align: center;
        }

    </style>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");

        String id =request.getParameter("id");
        UserDAO userDAO = new UserDAO();
        List idselect = userDAO.idselect(Integer.valueOf(id));
        User use = (User)idselect.get(0);
        session.setAttribute("grxx",use);
%>
<table class="content" border="1">
    <tr>
        <th>用户名</th>
        <th>出生日期</th>
        <th>联系方式</th>
        <th>邮件地址</th>
        <th>注册日期</th>
        <th>角色类型</th>
    </tr>
    <tr>
        <td>${sessionScope.grxx.username}</td>
        <td>${sessionScope.grxx.userBirthday}</td>
        <td>${sessionScope.grxx.userTel}</td>
        <td>${sessionScope.grxx.userEmail}</td>
        <td>${sessionScope.grxx.userRegisterTime}</td>
        <td id="type"></td>
    </tr>
    <script>
        var type = document.getElementById("type");
        if("${sessionScope.grxx.userRoleType}"=="0"){
            type.innerHTML="普通用户";
        }else if("${sessionScope.grxx.userRoleType}"=="1"){
            type.innerHTML="VIP用户";
        }
    </script>
</table>
</body>
</html>
